home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gamers Delight 2
/
Gamers Delight 2.iso
/
Aminet
/
game
/
board
/
GNUChess4_0_58.lha
/
gnuchess-4.0
/
misc
/
match
< prev
next >
Wrap
Text File
|
1992-08-26
|
861b
|
32 lines
#!/bin/sh
#
# match -- play a series of games using xboard as a referee
#
case $# in
8) COUNT=0; PGM1=$2 ; PGM2=$4 ; LENGTH=$6 ; MODE=$8 ;;
*) echo "Usage: match -pgm1 pgm -pgm2 pgm -length \
games -mode (Init | Position | Opening)" ; exit
esac
while (:)
do
if (test $COUNT -eq $LENGTH)
then
break
else
COUNT=`echo $COUNT | awk '{print $0 + 1}'`
MODULO=`echo $COUNT | awk '{print $0 % 2}'`
if (test $MODULO -eq 0)
then
xboard -fcp $PGM1 -scp $PGM2 \
-matchMode $MODE -saveGameFile match.game.$COUNT \
-savePositionFile match.position.$COUNT -iconic
else
xboard -fcp $PGM2 -scp $PGM1 \
-matchMode $MODE -saveGameFile match.game.$COUNT \
-savePositionFile match.position.$COUNT -iconic
fi
fi
done